Method and system for providing edge antialiasing

ABSTRACT

A system and method for generating a graphical image on a display is disclosed. The graphical image is generated from data describing at least one object. The display includes a plurality of positions. Each of the plurality of positions has an area. The system and method include determining if a portion of the at least one object intersects a current position of the plurality of positions and providing an output if the portion intersects the current position. The method and system further include providing a mask for the portion if it is determined that the portion intersects the current position. The mask indicates an extent to which the at least one portion occupies the area of current position. The method and system further include utilizing the mask to provide antialiazing. The method and system also include repeating the determining, one mask providing, and utilizing steps for each of the plurality of positions.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of Ser. No. 09/239,413 filed on Jan.28, 1999 now abandoned.

The present application is related to co-pending U.S. patent applicationSer. No. 08/624,261 entitled “Method and Apparatus for Identifying andEliminating Three-dimensional Objects Visually Obstructed from a PlanarSurface” filed on Mar. 29, 1996. The present application is also relatedto U.S. patent application Ser. No. 08/624,260 entitled “GraphicsProcessors, System and Method for Generating Screen Pixels in RasterOrder Utilizing a Single Interpolator” filed on Mar. 29, 1996. Thepresent application is also related to co-pending U.S. patentapplication Ser. No. 09/583,063 entitled “Method and System forProviding a Hardware Sort in a Graphics System” filed on May 30, 2000(937P).

FIELD OF THE INVENTION

The present invention relates to displaying objects on a computer systemand more particularly to a method and system for edge antialiasing whichprovides reduced staircasing while maintaining processing speed andusing a reduced amount of memory.

BACKGROUND OF THE INVENTION

A conventional computer graphics system can display objects on adisplay. The display includes a plurality of display elements, known aspixels, typically arranged in a grid. In order to display objects, theconventional computer graphics system typically breaks each object intoa plurality of polygons. A conventional system then typically rendersthe polygons in a particular order. For a three-dimensional scene, thepolygons are generally rendered from back to front as measured from theviewing plane of the display. Similarly, a two-dimensional scene can bedisplayed where polygons are rendered based on their layer. Deeperlayers are occluded by shallower layers.

When rendering each polygon, the conventional system often rendersdiagonal lines or polygons which have edges that are not perfectlyhorizontal or vertical. When a diagonal line is rendered, pixels notdirectly above or next to each other are used to render the line.However, each pixel is not a point. Instead, each pixel has physicaldimensions. For example, consider each pixel to be a square. As aresult, a diagonal line will not appear smooth. Instead, the edges ofthe line will appear jagged, similar to a staircase. This effect isknown as aliasing. Aliasing may appear for similar reasons at edges of apolygon. In order to reduce this effect, conventional systems performantialiasing. Antialiasing helps reduce the effect that the physicaldimension of the pixels has on the appearance of objects beingdisplayed.

Several conventional mechanisms are used to perform antialiasing. Eachmechanism has its drawbacks. One conventional mechanism determines thecolor for a pixel across which an edge lies by blending the colors ofpolygons existing at a pixel. The blending value for each polygon isused to determine how much the polygon will contribute to the color of aparticular pixel. The polygon occupies only a fraction of the area for apixel on which the edge of the polygon lies. Because the polygoncontributes only a fraction of the color for such a pixel, the color ofthe polygon is blended with the remaining colors for the pixel. As aresult, staircasing is reduced. However, some of the polygons at a pixelor the background may be obstructed. These polygons or the backgroundstill have a blending value which allows them to contribute to the colorof a pixel. As a result, the color of the obstructed polygon isdisplayed to a user. This effect is known as edge bleeding and isundesirable.

A second conventional mechanism for antialiasing is to render a polygonmultiple times. Each time the polygon is rendered, the polygon isshifted slightly. Similarly, a polygon can be inflated slightly. Theedges of the inflated polygon are translucent. As a result, the edgesare blurred and staircasing is reduced. However, because the polygon isshifted each time it is rendered, the entire polygon appears blurred. Inaddition, bleed through can occur at the edges.

A third conventional mechanism for antialiasing is known assupersamnpling. Each pixel is considered to be an M×N matrix ofsubpixels. Data for each polygon is evaluated at each subpixel. Finally,data for each subpixel in a pixel is combined to provide the data foreach pixel in the polygon. As a result, aliasing is reduced. However, inorder to perform supersampling, much more data is processed for eachpixel. For example, a pixel broken into M×N subpixels will require M*Nthe amount of processing as a pixel which is not supersampled.Consequently, processing is slowed. Furthermore, supersampling istypically performed for a portion of the display, called a tile, or theentire display at a time. Each pixel in the tile or display has M×Nsubpixels. Thus, the system requires enough memory to retain data forM×N subpixels for each pixel in a tile. Therefore, a large amount ofmemory is required. If only a tile is rendered, then it must be ensuredthat there are not artifacts at the seam between tiles. Thus, processingis again slowed.

A fourth conventional mechanism for antialiasing uses an accumulationbuffer (“A-buffer”) and is known as an A-buffer technique. Data for eachpixel in each polygon is processed. During processing, a mask isprovided for each pixel in each polygon. The mask indicates the portionof the pixel covered by the polygon. A linked list is then provided foreach pixel. The linked list links polygons that are associated with eachpixel to the pixel. To link polygons, the linked list typically holds amask, a color value, and other data relating to each polygon's potentialcontribution to the display of the pixel. After the entire scene hasbeen stored in the A-buffer, the linked list is then traversed in orderto accumulate and render data from the polygons associated with eachpixel. Aliasing is thereby reduced. However, the A-buffer technique alsohas its drawbacks. Two passes are made through the data in order torender objects to the display. The first pass is to provide the masksfor each polygon and to associate the polygons with particular pixels.The second pass utilizes the data stored for each pixel to determine howdata for each pixel is to be displayed. Thus, this mechanism is timeconsuming. The linked list must also be managed by the computer graphicssystem, making the A-buffer technique more difficult to implement.Typically both an A-buffer and a frame buffer are used in rendering thescene. Therefore, the A-buffer technique also requires additionalmemory.

A fifth technique for antialiasing finds the edges of each polygon beingrendered. Antialiased lines or lines having some transparency are thendrawn over the edges. This may give the appearance of the polygon edgebeing smooth. To avoid edge bleeding, the application must indicate“silhouette” edges, which are time consuming to calculate.

Accordingly, what is needed is a system and method for more efficientlyproviding antialiasing. The present invention addresses such a need.

SUMMARY OF THE INVENTION

The present invention provides a system and method for generating agraphical image on a display. The graphical image is generated from datadescribing at least one object. The display includes a plurality ofpositions. Each of the plurality of positions has an area. The systemand method comprise determining if a portion of the at least one objectintersects a current position of the plurality of positions andproviding an output if the portion intersects the current position. Themethod and system further comprise providing a mask for the portion ifit is determined that the portion intersects the current position. Themask indicates an extent to which the portion occupies the area ofcurrent position. The method and system further comprise utilizing themask to provide antialiasing. The method and system also includerepeating the determining, mask providing, and utilizing steps for eachof the plurality of positions.

According to the system and method disclosed herein, the presentinvention efficiently reduces staircasing without introducing additionalvisual artifacts, such as edge bleeding and blurring of the image, andwithout requiring brute force super-sampling. The present invention mayalso use less memory. Overall image quality is thereby increased withoutsignificant performance impact.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a conventional computer graphics systemwhich may be used to depict three-dimensional objects on atwo-dimensional display.

FIG. 2 is a diagram of a conventional display of a diagonal line.

FIG. 3 is a flow chart depicting a conventional antialiasing methodusing an A-Buffer technique.

FIG. 4 is a block diagram depicting a computer graphics system inaccordance with the present invention.

FIG. 5 is a flow chart depicting a method for providing a graphicaldisplay including antialiasing in accordance with the present invention,

FIG. 6 is a more detailed flow chart depicting a method for providing agraphical display including antialiasing in accordance with the presentinvention,

FIG. 7A is a schematic diagram of a pixel in the display of a computergraphics system in accordance with the present invention.

FIG. 7B is a schematic diagram of a mask for one portion of a firstpolygon intersecting the pixel in the display of a computer graphicssystem in accordance with the present invention.

FIG. 7C is a schematic diagram of a mask for one portion of a secondpolygon intersecting the pixel in the display of a computer graphicssystem in accordance with the present invention.

FIG. 8 is a flow chart of one embodiment of a method for providingantialiasing in accordance with the present invention.

FIG. 9 is a flow chart of another embodiment of a method for blending inaccordance with the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates to an improvement in computer graphicssystem, particularly systems used to depict three-dimensional objects ona two-dimensional display. The following description is presented toenable one of ordinary skill in the art to make and use the inventionand is provided in the context of a patent application and itsrequirements. Various modifications to the preferred embodiment will bereadily apparent to those skilled in the art and the generic principlesherein may be applied to other embodiments. Thus, the present inventionis not intended to be limited to the embodiment shown but is to beaccorded the widest scope consistent with the principles and featuresdescribed herein.

FIG. 1 depicts a block diagram of a conventional system 10 for providinga graphical display. In particular, the conventional system 10 may beused to provide a two-dimensional display of three-dimensional objects.Typically, the three-dimensional objects are broken into polygons, suchas triangles, for display. A software application 12 is used to displaythe polygons. The application 12 calls drivers 14 which create a displaylist. The display list contains the x, y, and z coordinates, alpha orblending value, color, and other information for each polygon. Thedisplay list also lists the information relating to each polygon in theorder in which the polygons will be rendered to the display 22. Notethat the z coordinate may represent a depth. The depth can represent avariety of mechanisms for occluding portions of the scene. For example,z may refer to a distance from a viewing plane in a three-dimensionalscene or may represent a layer order in a two-dimensional scene.

Once the polygons are properly ordered in the display list, a hardwarerenderer 16 begins the process of rendering the polygons to the display22. The display list is provided to the hardware renderer 16, whichprepares data relating to the polygons for display. The hardwarerenderer 16 creates a z buffer 17 and a frame buffer 18 to store datarelating to each of the polygons. The z buffer 17 includes the z-valuesfor each pixel in the polygon. The frame buffer 18 includes the colorsfor each pixel in the polygon. For each polygon on the display list,data from the z buffer 17 and frame buffer 18 are then provided to thedisplay controller 20. The display controller 20 then outputs the dataon the display 22. The polygons could be rendered in any order. Forexample, for efficiency, opaque polygons are typically desired to berendered from front, or close to the viewing plane, to back, or far fromthe viewing plane. On the other hand, translucent polygons are typicallydesired to be rendered from back to front. In addition, the system 10typically completes rendering one polygon before commencing renderingthe next polygon.

FIG. 2 depicts a close-up view of a portion 30 of the display 22. Theportion 30 of the display 22 includes a grid of sixty-four pixels 31.Note, however, that only one of the pixels 31 is labeled. Although thepixels 31 in the portion 30 of the display 22 are depicted as square,this shape is chosen for ease of explanation. A diagonal line 32 isdrawn across the portion 30 of the display 22. Although depicted as aline, the line 32 could be an edge of a polygon. Because each pixel 31has finite physical dimension, the line 32 does not have smooth edges.Instead, the line 32 is jagged, having a staircase appearance. Thisphenomenon is known as aliasing.

The conventional system 10 depicted in FIG. 1 may utilize a variety ofmechanisms to reduce aliasing. The effort to reduce aliasing is known asantialiasing. One conventional mechanism for antialiasing is known as anaccumulation buffer (A-buffer) technique. In such a conventional system,an A-buffer replaces the z buffer 17. FIG. 3 depicts a conventionalmethod 40 for utilizing the A-Buffer technique for a particular polygon.Data for each pixel 31 in each polygon is processed in step 42, therebyproviding a fragment for each pixel 31 that the polygon covers. Afragment includes data for a portion of a particular polygon that coversthe pixel 31 with which the fragment is also associated. Typically, step42 is performed polygon by polygon. In step 42, a mask is also providedfor each pixel in each polygon. The mask indicates the extent of thepolygon in the particular pixel 31. The fragments for the polygon arethen inserted into a linked list, via step 44. In step 44, each fragmentinserted into the linked list is associated with the correspondingpixel. The linked list associates each pixel 31 with a portion of eachpolygon that would be displayed on the pixel 31. Typically, steps 42 and44 are performed in a first pass through data for all polygons beingrendered on the display. Therefore, steps 42 and 44 are repeated for allpolygons, via step 46. Once the fragments have been generated for eachpolygon and inserted into the linked list, the first pass through thedata is completed. The linked list is then traversed in order toaccumulate and render data from the polygons associated with each pixelvia step 48. In step 48, data is rendered pixel by pixel from the linkedlist. Step 48 is typically performed in a second pass through the data.

Although the A-buffer technique reduces staircasing, one of ordinaryskill in the art will realize that this technique has its drawbacks. Inparticular, two passes are made through the data in order to renderobjects to the display. The first pass is to provide the masks for eachpolygon and to associate the polygons with, particular pixels, in steps42-46. Consequently, the first pass through the data is typically donepolygon by polygon. The second pass utilizes the linked list to renderthe data in pixel order. Because two passes are required, the A-buffertechnique is time consuming. The polygons are also rendered in both theA-buffer and the frame buffer 18. Therefore, more memory may beconsumed. In addition, the linked list must be managed by the computergraphics system. Consequently, the A-buffer technique is more difficultto implement.

One of ordinary skill in the art will also realize that otherconventional antialiasing methods have their drawbacks. Supersampling,which processes data for subpixels in each pixel, provides antialiasingbut is time consuming because of the number of calculations involved.Supersampling also consumes more memory because sections containingmultiple pixels and, therefore, multiple subpixels, are rendered at atime. Using the blending value of each portion of each polygon todetermine the color of a pixel results in edge bleeding, in which thecolor of the background or obstructed polygons appear to the user.Rendering each polygon multiple times at slightly different positionsreduces aliasing but blurs the entire image and requires additionaltime.

The present invention provides a system and method for generating agraphical image on a display. The graphical image is generated from datadescribing at least one object. The display includes a plurality ofpositions. Each of the plurality of positions has an area. The systemand method comprise determining if a portion of the at least one objectintersects a current position of the plurality of positions andproviding an output if the portion intersects the current position. Themethod and system further comprise providing a mask for the portion ifit is determined that the portion intersects the current position. Themask indicates an extent to which the portion occupies the area ofcurrent position. The method and system further comprise utilizing theat least one mask to provide antialiasing. The method and system alsoinclude repeating the determining, at least one mask providing, andutilizing steps for each of the plurality of positions.

The present invention will be described in terms of a particularcomputer graphics system and a particular number of subpixels per pixel.However, one of ordinary skill in the art will readily recognize thatthis method and system will operate effectively for other types ofcomputer graphics systems, masks of other sizes, and other systems notinconsistent with the present invention. The present invention will alsobe described in the context of a three-dimensional display. However, oneof ordinary skill in the art will readily realize that the presentinvention could be used in rendering two-dimensional scenes. Forexample, two-dimensional scenes may contain objects that are partiallyoccluded. Occlusion can be described by a layer order. The layer ordercan be described by a depth value. Deeper layers are occluded by shallowlayers. Therefore, in the context of the present invention z representsa depth value. The depth value includes a three-dimensional depth, suchas a distance from the viewing plane or a w value, or another type ofdepth such as layer order.

To more particularly illustrate the method and system in accordance withthe present invention, refer now to FIG. 4 depicting a simplified blockdiagram of one embodiment of a computer graphics system 100 inaccordance with the present invention. Portions of the computer system100 are described more completely in co-pending U.S. patent applicationSer. No. 08/624,261 entitled “Method and Apparatus for Identifying andEliminating Three-Dimensional Objects Visually Obstructed from a PlanarSurface”. Applicant hereby incorporates by reference the above-mentionedco-pending application. The present invention is also related toco-pending U.S. patent application Ser. No. 08/624,260 entitled“Graphics Processors, System and Method for Generating Screen Pixels inRaster Order Utilizing a Single Interpolator” filed on Mar. 29, 1996.Applicant hereby incorporates by reference the above-mentionedco-pending application.

The computer graphics system 100 includes a central processing unit(CPU) 102, a display 104, a user interface 106 such as a keyboard ormouse or other communicating device, a memory 110, and an imagegenerating unit 120 coupled with a bus 108. The display 104 includes aplurality of pixels, not shown. Each of the plurality of pixels has anarea. Note, however, that nothing prevents the method and system frombeing implemented in a different computer system having othercomponents. The display 104 could include a display memory (not shown)to which pixels are written. For example, the display 104 could includea frame buffer. However, the present invention can also be implementedwithout a frame buffer. The system 100 is used to display objects,particularly three-dimensional objects. In order to do so, each of theobjects is preferably broken into polygons to be used in rendering theobjects.

The image generating unit includes an interface 121 connected to the bus108. The interface 121 transmits data to a data processing unit 122. Aprocessor block 124 is coupled with the data processing unit 122. Theprocessor block 124 identifies data describing portions of polygons(“intersecting polygons”) which intersect the area extending along az-axis from a selected pixel in an x-y plane corresponding to a screenof the display 104. In a preferred embodiment, the processor block 124includes a processor for each intersecting polygon. The data associatedwith the portion of the intersecting polygon associated with theselected pixel is termed a fragment. Thus, data relating to eachselected pixel includes fragments for each portion of each of theintersecting polygons.

An obstructed object identifier/removal unit 126 receives the fragmentsfrom each intersecting polygon associated with the selected pixel andremoves fragments for the portions of certain polygons which areobstructed without determining the precise z-value of the polygon. Theobstructed object identifier/removal unit 126 is described morecompletely in co-pending U.S. patent application Ser. No. 08/624,261entitled “Method and Apparatus for Identifying and EliminatingThree-Dimensional Objects Visually Obstructed from a Planar Surface”.The interpolator 128 receives the fragments for the portions of polygonsintersecting the particular pixel and interpolates the data, includinginterpolating texture, color, and alpha values for the fragment. Theinterpolator 128 also provides a mask, discussed below, for eachfragment. Although mask generation can be considered logically distinctfrom interpolation, the mask is preferably generated by a sub-block (notshown) of the interpolator 128. However, in an alternate embodiment,mask generation can be provided by another unit. The mask can beconsidered part of the data relating to each portion of each of theintersecting polygons. Thus, the mask is part of the fragment for eachportion of each of the intersecting polygons. The interpolator 128provides the fragments for each of the remaining intersecting polygonsto a hardware sorter 130. The hardware sorter is more completelydescribed in co-pending U.S. patent application Ser. No. 09/583,063entitled “Method and System for Providing a Hardware Sort in a GraphicsSystem” filed on May 30, 2000. Applicant hereby incorporates byreference the above-mentioned co-pending application. The hardwaresorter 130 sorts the fragments for the intersecting polygons based onthe value of a key associated with the fragment. Preferably, the key isthe z value, or depth value, for the fragment at the selected pixel.Note, however, that the present invention is consistent with other sortsor with no sort. The sorted fragments for each pixel are then providedto a buffer 132. In a preferred embodiment, the buffer 132 includessubpixel buffers 134 and a blending unit 136. However, in an alternateembodiment, multiple blending units 136 can be used. Preferably, thedata for the pixels is provided to the buffer 132 in the order in whichthe pixels will be displayed. Preferably, this order is in raster orderon the display 104.

FIG. 5 depicts one embodiment of a method 150 for providing antialiasingin accordance with the present invention. It is determined if a portionthe polygons for objects to be displayed intersects a current position,via step 152. Thus, in step 152, the portions of the intersectingpolygons are determined for the current position. Also via step 152, anoutput is provided if at least one portion of a polygon intersects thecurrent position. The current position is preferably a current pixel. Ina preferred embodiment, the processor block 124 performs step 152. Amask is then provided via step 154. In a preferred embodiment, a mask isprovided for each portion of each polygon that intersects a currentposition. The mask indicates the extent to which the portion of theintersecting polygon occupies the area of the current pixel. Thefragments for each portion of each intersecting polygon may also beinterpolated in step 154 to provide other information relating to thecurrent pixel. The information provided includes the mask for eachportion of each intersecting polygon. The masks are then utilized toprovide antialiasing via step 156. Steps 152 through 156 are thenrepeated for each pixel remaining in the display 104, via step 158.

FIG. 6 depicts a more detailed flow chart of a method 160 for providingantialiasing in accordance with the present invention. Note that theorder of steps in the method 160 can be changed. Furthermore, some stepscan be omitted. It is determined if portions of polygons for objects tobe displayed intersect a current position, via step 162. Thus, in step162, the portions of the intersecting polygons are determined. Also viastep 162, an output is provided if the at least one portion of a polygonintersects the current position. The current position is preferably acurrent pixel. In a preferred embodiment, step 162 includes providingfragments for polygons that intersect the current pixel. Also in apreferred embodiment, the processor block 124 performs step 162. A maskis then provided via step 164. The mask indicates the extent to whichthe portion of the intersecting polygon occupies the area of the currentpixel. Also in step 164, the fragments for each portion of eachintersecting polygon are interpolated to provide information relating tothe current pixel. The information provided includes the mask for eachportion of each intersecting polygon. Fragments for portions of someobstructed intersecting polygons are then removed via step 166.Preferably, this is accomplished without determining an exact z-valuefor the portion of the intersecting polygon. Thus, step 166 ispreferably performed by the obstructed object identifier/removal unit.The fragments for the remaining intersecting polygons are then sortedvia step 168. In an alternate embodiment, step 168 may be performedbefore step 164 of providing the masks. The fragments sorted include themask for each remaining intersecting polygon.

The masks provided in steps 154 or 166 can be explained with referenceto FIGS. 7A through 7C. FIG. 7A depicts a pixel 200 of the display 104.As discussed above, each pixel 200 has an area. The pixel 200 includessixteen subpixels 201 through 216. There are two polygons 220 and 222which intersect the pixel 200. Thus, polygons 220 and 222 are portionsof intersecting polygons, each of which covers a part of the pixel 150.

FIG. 7B depicts a mask 230 for the first polygon 222. The mask 230contains ones in subpixels 203, 207, and 210-216. Although shown asempty, the subpixels 201, 202, 204-206 and 208-209 may contain zeroes.The positions of the ones in subpixels 203, 207, and 210-216 indicatewhere the polygon 222 exists. Thus, the mask 230 also indicates thelocation of the edges of the portion of the intersecting polygon.

FIG. 7C depicts a mask 240 for a second polygon 220. The mask 240contains ones in subpixels 204, 206-207, and 210-216. Although shown asempty, the subpixels 201-203, 204-205 and 209 may contain zeroes. Thepositions of the ones in subpixels 204, 206-207, and 210-216 indicatewhere the portion of the polygon 220 exists. Thus, the mask 240 alsoindicates the location of the edges of the portion of the intersectingpolygon.

FIG. 8 depicts a more detailed flow chart of one embodiment 180 of thestep 156 or the step 170 of utilizing the mask(s) to provideantialiasing. The method 180 is preferably used for all fragmentsprovided from the hardware sorter 130. For each subpixel 201 through216, the masks are used to blend the fragments for the portions of theintersecting polygon, via step 182. In a preferred embodiment, thisblending is performed using a different subpixel buffer 134 in thebuffer 132 for each subpixel 201 through 216. In the preferredembodiment, a blending unit 136 aids in performing the blending in step182. However, in an alternate embodiment, another number of blendingunits 136 can be used. For example, one blending unit could be used foreach subpixel buffer 134. Also in a preferred embodiment, sixteensubpixels and, therefore, sixteen subpixel buffers 134 are utilized.Each separate buffer retains data for polygons that have a one in themask for the subpixel corresponding to the subpixel buffer 134. In apreferred embodiment, blending is accomplished using the data, such asblending values, in the fragments for each intersecting polygon. Whenthe blending step 182 is completed, each subpixel buffer 134 includesthe blended data for all intersecting polygons contributing to thesubpixel corresponding to the subpixel buffer 134. The data for each ofthe subpixels 201 through 216 residing in the subpixel buffers 134 isthen summed via step 184. The data is then divided by the number ofsubpixels, via step 186. In an alternate embodiment, the method 180could combine pixels 131 in another manner. For example, another filter,such as sinc filter, could be used. The subpixels 202-216 could overlap,rather than being adjacent. Non-adjacent subpixels are particularlyadvantageous when used with a sinc filter. Thus, the appropriate datafor the pixel 200 is provided.

For example, for the pixel 200, the masks 230 and 240 may be used instep 182 to blend data for polygons 220 and 222 which intersect thepixel 200. Data for the two polygons 220 and 222 will be blended insubpixels 207 and 210 through 216. This is because the masks 230 and 240indicated that the polygons 220 and 222 overlap in these subpixels. In apreferred embodiment, the data for polygons 220 and 222 is combinedusing the blending values. In another embodiment, some other blendingfunction might be used. Data for the polygon 222 will be retained insubpixel 203. Data for the polygon 220 will be retained in subpixel 204.The remaining subpixels 201, 202, 205, 206, and 209 retain thebackground color. This is because there are no polygons at thesesubpixels. The data retained for each of the subpixels 201 through 216would then be summed and averaged via steps 184 and 186, respectively.

FIG. 9 depicts a more detailed flow chart of one embodiment of a method190 for performing step 182, using masks to blend data for portions ofintersecting polygons. Blending is considered to have a source and adestination. Data from the source is blended with data residing in thedestination. In the method 190, the source is a fragment for a polygonwhich intersects a pixel currently being processed. For a fragment of anintersecting polygon, the corresponding mask is used to determine thedestinations, via step 192. The destinations are the subpixel buffers134 for which the mask has a one. As discussed above, each subpixelbuffer 134 preferably corresponds to a particular subpixel 210 through216. Using data in the fragment, such as the blending value, thefragment is blended with the data in each of the destinations, via step194. Thus, the blending step 194 accounts for whether particularfragment being blended is translucent or opaque. In addition, in apreferred embodiment, fragments are provided from the hardware sorter130 from the highest to lowest z value. Consequently, the z value andwhether the fragment obstructs a fragment having a higher z value mayalso be accounted for in the blending step 194. Via step 196, steps 192and 194 are repeated for each fragment provided from the hardware sorter130. Thus, the data for fragments for polygons intersecting a pixel isblended. The blended data for the subpixels 201 through 216 can then beaveraged and provided to the display 104. Alternatively, each subpixel201-216 could have a color buffer and a z buffer (not shown). Whencombining fragments for multiple pixels, a z compare could be performedfirst.

Because the methods 150 and 160, particularly steps 156 and 170,aliasing is reduced. Because data for subpixels 201 through 216 is used,the benefits of supersampling are achieved. Thus, a more accuraterendering of the objects to be displayed are provided and aliasingreduced. Moreover, the methods 150 and 160 do not suffer from thedrawbacks of conventional antialiasing methods. For example, becausemasks 230 and 240 are used to determine which data for subpixels 201through 216 should be used in antialiasing, the method 150 and 160 aresimpler than conventional supersamnpling. The pixels are also renderedin raster order using only one pass through the data for objects to berendered. Thus, the method 150 or 160 requires fewer passes through thedata than the conventional A-buffer technique. In addition, the method150 or 160 does not require linked lists used by conventionalA-buffering. Processing is made easier because managing of linked listsis not required. Furthermore, the amount of memory used is reduced.Unlike using the blending value only in antialiasing, edge bleeding iseliminated because the magnitude of the blending value as well as theintersecting polygon's shape are known. Moreover, since polygons are notrendered multiple times in different positions, the images displayed arenot blurred. Thus, antialiasing is performed without many of thedrawbacks associated with conventional methods for providingantialiasing.

A method and system has been disclosed for providing antialiasing ofobjects in a graphical display. Although the present invention has beendescribed in accordance with the embodiments shown, one of ordinaryskill in the art will readily recognize that there could be variationsto the embodiments and those variations would be within the spirit andscope of the present invention. Accordingly, many modifications may bemade by one of ordinary skill in the art without departing from thespirit and scope of the appended claims.

1. A method for generating a graphical image on a display from datadescribing at least one object, the display including a plurality ofpositions, each of the plurality of positions having an area, the methodcomprising the steps of: (a) determining if a portion of an object ofthe at least one object intersects a current position of the pluralityof positions and providing an output if the portion intersects thecurrent position; (b) providing a mask for the portion if it isdetermined that the portion intersects the current position, the maskindicating an extent to which the portion occupies the area of thecurrent position; (c) using the mask to provide antialiasing for theportion at the current position; (d) repeating steps (a)-(c) for eachremaining object of the at least one object at the current position; and(e) repeating steps (a) through (d) for each remaining position of theplurality of positions once step (d) is performed for the currentposition; thereby allowing the graphical image to be rendered positionby position in raster order; wherein each of the plurality of positionsis a pixel and wherein the current position is a current pixel on thedisplay.
 2. The method of claim 1 wherein the current position includesa plurality of subareas, wherein the mask indicates a portion of theplurality of the subareas that are occupied by the portion of theobject, and wherein the utilizing step (c) further includes the stepsof: (c1) using the at least one mask to blend information relating tothe at least one portion for the portion of the plurality of subareas.3. The method of claim 2 wherein the plurality of subareas furthercomprise a number of subareas and wherein the utilizing step (c) furtherincludes the steps of: (c2) summing the information for each of theplurality of subareas to provide a resultant; and (c3) dividing theresultant by the number of subareas.
 4. The method of claim 1 furthercomprising the step of: (f) removing the portion of the object if theportion of the object is obstructed.
 5. The method of claim 4 furthercomprising the step of: (g) sorting each portion based on the z-value.6. The method of claim 5 wherein the repeating step (d) further includesthe step of: (e1) repeating steps (a) through (c) and steps (f) through(g) for each remaining object.
 7. The method of claim 6 wherein therepeating step (d) further includes the step of: (e1) repeating steps(a) through (c) and steps (f) through (g) for each of the plurality ofpositions.
 8. A system for generating a graphical image on a displayfrom data describing at least one object, the system comprising: adisplay including a plurality of positions, each of the plurality ofpositions having an area; a processor block coupled with the display,the processor block for determining if a portion of each of the at leastone object intersects a current position of the plurality of positionsand providing an output if the portion intersects the current position;an interpolator coupled with the processor block, the interpolator forinterpolating the data and providing a mask for the portion, the maskindicating an extent to which the portion occupies the area of thecurrent position; and means for utilizing the mask to provideantialiasing; wherein the at least one object are rendered by theinterpolator and the mask utilizing means position by position in rasterorder; and wherein the processor block provides the output for all ofthe at least one object intersecting the current position beforeproviding an output for any of the at least one object intersecting asubsequent position; wherein each of the plurality of positions is apixel and the current position is a current pixel.
 9. The system ofclaim 8 wherein the current position includes a plurality of subareas,wherein the mask indicates a portion of the plurality of subareasoccupied by the portion, and wherein the utilizing means furtherincludes: means for using the mask to blend information relating to theportion of each of the at least one object for the portion of theplurality of subareas.
 10. The system of claim 9 wherein the pluralityof subareas further comprise a number of subareas and wherein the bufferis further used to sum the information for each of the plurality ofsubareas to provide a resultant and to divide the resultant by thenumber of the plurality of subareas.
 11. The system of claim 8 furthercomprising: means for sorting each portion of each of the at least oneobject based on the z-value.
 12. The system of claim 11 wherein thesorting means further comprise: an obstructed object identifier/removalunit coupled with the processor block and the interpolator, in responseto the output and without determining a precise axial position of theportion of each of the at least one object, the obstructed objectidentifier/removal unit identifies if the portion of each of the atleast one object is visually obstructed and removes data relating to theportion of the at least one object if the portion of the at least oneobject is obstructed; and a hardware sorter coupled to the interpolatorand the buffer for sorting the portion of each of the at least oneobject for the current position based on the z-value of the portion ofeach of the at least one object.